package interpreter.impl;

import interpreter.Node;

/***
 * 非终结符表达式，乘法
 */
public class MulNode extends Node {
    private final Node leftNode;
    private final Node rightNode;

    public MulNode(Node leftNode, Node rightNode) {
        this.leftNode = leftNode;
        this.rightNode = rightNode;
    }

    @Override
    public double interpret() {
        return leftNode.interpret() * rightNode.interpret();
    }
}